package com.zzty.txj.serviceImpl;


import com.zzty.txj.dao.DailyMapper;
import com.zzty.txj.dao.PostMapper;
import com.zzty.txj.entity.Daily;
import com.zzty.txj.entity.DoDaily;
import com.zzty.txj.entity.User;
import com.zzty.txj.entity.UserDaily;
import com.zzty.txj.service.DailyService;
import com.zzty.txj.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PostServiceImpl implements PostService {
    @Autowired
    PostMapper postMapper;
    public List<Daily> getDaily(){
       List<Daily>getDaily=postMapper.getDaily();
       return getDaily;
    }

    public String getCount(User user){
        String count=postMapper.getCount(user);
        return count;
    }

    public String getName(int id){
        String name=postMapper.getName(id);

        return name;
    }

    public List<DoDaily>doDaily(){
        List<DoDaily>doDailies=postMapper.doDaily();
        return doDailies;
    }

    public String getDailyName(int id){
        String name=postMapper.getDailyName(id);
        return name;
    }

    public List<UserDaily>getDailyName1(){
        List<UserDaily>userDailies=postMapper.getDailyName1();
        return userDailies;
    }


    public List<DoDaily>getDailyByUserId(Integer id){
        List<DoDaily>getDailyId=postMapper.getDailyByUserId(id);
        return getDailyId;
    }
    public Integer count(DoDaily doDaily){
        Integer count=postMapper.count(doDaily);
        return  count;
    }
}
